package com.eks.user.api.impl;

import com.eks.user.api.UserApi;
import com.eks.user.exception.UserNameException;
import org.apache.dubbo.config.annotation.Service;

import java.util.Objects;

/**
 * UserApiImpl
 *
 * @author: chenfenghai
 * @version: 1.0
 * @date: 2020-06-03 15:06
 * @blame Team
 */
@Service(version = "1.0.0")
public class UserApiImpl implements UserApi {

    @Override
    public String getUserName(String id) {
        if(Objects.isNull(id)){
            throw new UserNameException("id参数不能为空");
        }
        return "user-name";
    }
}
